$(window).ready(function(){
	window_setting();
});

$(window).resize(function(){
	window_setting();
});

document.onkeydown = function (e) {
	var theEvent = window.event || e;
	var code = theEvent.keyCode || theEvent.which;
	if (code == 13) {
		$("#login").click();
	}
};

function window_setting(){
	return;
	var hei = $(document).height();
	var wid = $(document).width();
	if(hei < 600){
		hei = 600;
	}
	$(".content.content1").css({
		left:(wid-320)/2,
		//top:(hei-$(".content").height())/2-120
		top:225
	});
}

function to_register(){
	window.location = '/fw/pages/home/register.jsp';
}

function login(){
	var email = $('.email').val();
	var password = $('.password').val();
	var code = $('.vc').val();
	if(!$('form').validate()){
		return;
	}
	else{
		$('form').submit();
	}
}
function register(){
	location.href = "/fw/pages/agent/agentAdd.jsp";
}

function forgetPw(){
	location.href = "/fw/pages/home/confirmaccount.jsp";
}

function changeVc(){
	$('.vcimg').attr('src','/fw/common/verify_graphCode.action?_dc' + Math.random());
}